package cn.edu.dlut.port.isp.bean.teach.simulation;
import java.util.Vector;

import javax.persistence.Entity;

import cn.edu.dlut.port.optiplan.elem.Ship;

/**
 *
 * @author tangguolei
 */
public class ShipBean {

    public static int GENERALCARGOSHIP = 1;
    public static int IMPORTBULKFREIGHTER = 2;
    public static int EXPORTBULKFREIGHTER = 3;
    public static int IMPORTOILCARRIER = 4;
    public static int EXPORTOILCARRIER = 5;
    public static int CONTAINERSHIP = 6;
    public static int BULKFREIGHTER = 7;
    public static int OILCARRIER = 8;
    private int typeInt;
    private String type;
    private String typeDetail;
    private int tonnage;
    private double length;
    private double width;
    private double depth;
    private double draft;
    private double operatingDraft;
    private double velocity;
    private double cargoesPerShip;
    private double efficiencyLULPerShip;
    private double elocity;

    public double getCargoesPerShip() {
        return cargoesPerShip;
    }

    public void setCargoesPerShip(double cargoesPerShip) {
        this.cargoesPerShip = cargoesPerShip;
    }

    public double getDepth() {
        return depth;
    }

    public void setDepth(double depth) {
        this.depth = depth;
    }

    public double getDraft() {
        return draft;
    }

    public void setDraft(double draft) {
        this.draft = draft;
    }

    public double getEfficiencyLULPerShip() {
        return efficiencyLULPerShip;
    }

    public void setEfficiencyLULPerShip(double efficiencyLULPerShip) {
        this.efficiencyLULPerShip = efficiencyLULPerShip;
    }

    public double getElocity() {
        return elocity;
    }

    public void setElocity(double elocity) {
        this.elocity = elocity;
    }

    public double getLength() {
        return length;
    }

    public void setLength(double length) {
        this.length = length;
    }

    public double getOperatingDraft() {
        return operatingDraft;
    }

    public void setOperatingDraft(double operatingDraft) {
        this.operatingDraft = operatingDraft;
    }

    public int getTonnage() {
        return tonnage;
    }

    public void setTonnage(int tonnage) {
        this.tonnage = tonnage;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getTypeDetail() {
        return typeDetail;
    }

    public void setTypeDetail(String typeDetail) {
        this.typeDetail = typeDetail;
    }

    public int getTypeInt() {
        return typeInt;
    }

    public void setTypeInt(int typeInt) {
        this.typeInt = typeInt;
    }

    public double getVelocity() {
        return velocity;
    }

    public void setVelocity(double velocity) {
        this.velocity = velocity;
    }

    public double getWidth() {
        return width;
    }

    public void setWidth(double width) {
        this.width = width;
    }

    @SuppressWarnings("UseOfObsoleteCollectionType")
    public Vector<String> toVector() {
        System.out.println(tonnage + " t SHIP");
        return new Vector<String>() {
            {
                add(tonnage + "");
                add(type);
                add(length + "");
                add(width + "");
                add(depth + "");
                add(draft + "");
                add(cargoesPerShip + "");
                add(efficiencyLULPerShip + "");
                add(velocity + "");
            }
        };
    }

    public Ship toShip() {
        return null;
    }
}